package task2;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 东莞呵呵
 * Date:2022-06-09
 * Time:14:39
 */
public class CheeseBurgerComboMeal {
    private FrenchFries frenchFries;
    private Cola cola;
    private CheeseBurger cheeseBurger;
    private int price;
    public void showMessage(){
        System.out.println("欢迎选用吉士汉堡套餐");
        System.out.println("吉士汉堡："+cheeseBurger.getSize()+";单价："+cheeseBurger.getPrice()+"元；");
        System.out.println("可乐："+cola.getVolume()+";单价："+cola.getPrice()+"元；");
        System.out.println("吉士汉堡："+frenchFries.getType()+";单价："+frenchFries.getPrice()+"元；");
        System.out.println("套餐优惠价："+this.price+"；为您省下"+
                (cheeseBurger.getPrice()+ cola.getPrice()+frenchFries.getPrice()-this.price)
                +"元；");
    }

    public CheeseBurgerComboMeal(FrenchFries frenchFries, Cola cola, CheeseBurger cheeseBurger, int price) {
        this.frenchFries = frenchFries;
        this.cola = cola;
        this.cheeseBurger = cheeseBurger;
        this.price = price;
    }
}
